<?php
class FloorBrandAction extends BaseAction
{
	/**
	 * 柜台界面
	 * @param array $mall
	 * @param array $floor
	 * @param array $brand
	 * @author Ice <iceinto@mallog.com.cn>
	 */
	public function home($mall, $floor, $brand)
	{
		if ($brand) {
            $bid = $brand['id'];
            $BrandModel = D('Brand');
            $BrandNewsModel = D('BrandNews');
            $brand = $BrandModel->find($bid);
            //品牌详细信息 获取图片
            $brand['image_url'] = $BrandModel->getBrandImage($brand['image']);
            //获取关注
            $brand['att_count'] = D('BrandAttention')->getAttCount($bid);
            //获取当前柜台活动
            $brand['dis'] = $BrandNewsModel->getOneNewAll($mall['id'], $floor['id'], $bid, 'id,title,keyword,start_time,end_time,detail');
            //获取所属商圈
            $brand['bus'] = M('Bus')->find($mall['cbd']);
            //获取品牌其他商场活动
            $brand['other_mall'] = $BrandNewsModel->getBrandOtherMallDis($mall['id'], $floor['id'], $bid);
            if (!empty($brand['dis'])) {
            	$this->assign('day_time', $this->getThisDayTime());
            }
        }
        $this->assign('mall', $mall);
        $this->assign('floor', $floor);
        $this->assign('brand', $brand);
        $this->assign('web_title', $brand['name']);
        $this->display('FloorBrand:home');
	}
}
?>